<?php

function error(&$m,$n=NULL)
{
	if(is_object($m))
	{
		$m->type = 'error';
		$m->message = $n;
	}
	else
	{
		$m = new StdClass;
		$m->type = 'error';
		$m->message = '[000] Error: bad error message';
	}
	return $m;
}
?>